/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package motiveai.tests;

import com.jme3.math.ColorRGBA;
import motiveai.annotation.DurationOfBehaviour;
import motiveai.components.Agent;
import motiveai.components.BehaviourEntity;
import motiveai.factors.Environment;

/**
 *
 * @author oxplay
 */
public class Test3Push2 extends BehaviourEntity<Test3Agent> {
    
    public Test3Push2() {
    }
    
    public boolean canBeUsed(Test3Agent agent, Environment environment) {
        return true;
    }
    
    @Override
    @DurationOfBehaviour(duration=0.5f)
    public float behave(Test3Agent agent, Environment environment) {
        System.out.println("pushing 2");
        environment.setBooleanFactor("pushed2", false);
        environment.setBooleanFactor("noPush", false);
        agent.boxes.get(1).getControl(HighLightControl.class).highlight(0.3f, ColorRGBA.Green);
        return 0;
    }

    
}
